<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core">

<f:metadata>
<f:event type="preRenderView" listener="#{MBLogin.checkAlreadyLoggedin}" />
</f:metadata>

<h:body>
<ui:composition template="./newTemplate.xhtml">
<ui:define name="content"> 

                  
<script type="text/javascript">
function mostrar() {
  obj = document.getElementById('waitDiv');
  obj.style.display = (obj.style.display=='none') ? 'block' : 'none';
}
</script>

<div id="waitDiv" style="display:none"><p:graphicImage value="images/ajax-loader_2.gif"/>&nbsp;&nbsp;Procesando registro...porfavor espere.</div>

    <h:panelGroup id="messagePanel" layout="block">
                    <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                </h:panelGroup>
    
                <h:form>
                    <p:panelGrid columns="2">
                        <h:outputLabel value="Titulo: " for="tituloTicket" />
                        <p:inputText id="tituloTicket" value="#{hdTicketsController.selected.tituloTicket}" required="True" requiredMessage="El campo Titulo es Requerido" size="50"/>
                        <h:outputLabel value="Descripcion: " for="descTicket" />
                        <p:editor id="descTicket" value="#{hdTicketsController.selected.descTicket}" required="True" requiredMessage="El Campo Descripcion es Requerido" width="600" height="150" />
                        <f:facet name="footer">
                            <p:commandButton value="Guardar" action="#{hdTicketsController.create1(mBLogin.codUsuario)}" onclick="mostrar()" ajax="false" id="enla" />
                            <p:commandButton value="Borrar" type="button" ajax="false" />
                        </f:facet>
                    </p:panelGrid>
                    
                </h:form>
</ui:define>
</ui:composition>
</h:body>
   
</html>

